<?php
//整数的多种表现形式
echo 12345,"\n";//10进制的整数
echo 0b1011,"\n";//2进制整数，以0b开头，后跟0~1数字
echo 567,"\n";//10进制
echo 0567, "\n";//8进制整数，以0开头，后跟0~7数字
echo 0x2AF,"\n";//16进制整数，以0x开头，后跟0~9A-F数字
//算数运算符
echo 18 / 5,"\n";//18除以5
echo 18 % 5,"\n";//18除以5的余数
echo @(18.9 % 5.8),"\n";//%两边的数据会转换为整数，18除以5的余数
echo 3**2.5,"\n"; //3的2.5次方
//运算符的优先级
echo 5-6*2,"\n"; //*的优先级比-高
//运算符的结合性
echo 8/4*2,"\n";//从左向右计算
echo (-3)**2,"\n";//()的优先级最高
//不同类型数据间的算术运算
echo '2000'+123,"\n";
echo 123+'2000',"\n";
echo '2000'+'123',"\n";
echo 2000+'0o123',"\n";//不识别2、8、16进制
echo 2000+'0x123',"\n";
echo 2000+'+123',"\n";//可以识别正负号
echo 2000+'-123',"\n";
echo 2000+'123aaaa',"\n";
echo 2000+'0o123',"\n";
//echo 2000+'aaaaa',"\n";//一开始就是非法数字，无法计算
echo 2000+'2e2',"\n";//'2e2'就是200
echo 2000+NULL,"\n";//NULL就是0
echo 2000+true,"\n";//true就是1
echo 2000+false,"\n";//false就是0//